package com.dengyafei.mapper;

import com.dengyafei.bean.ItemEntity;
import com.dengyafei.bean.ItemEntityExample;

import java.util.List;

import com.dengyafei.domin.dto.QueryItemsDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 邓亚非
 */
@Mapper
public interface ItemEntityMapper {
    int countByExample(ItemEntityExample example);

    int deleteByExample(ItemEntityExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ItemEntity record);

    int insertSelective(ItemEntity record);

    List<ItemEntity> selectByExample(ItemEntityExample example);

    ItemEntity selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ItemEntity record, @Param("example") ItemEntityExample example);

    int updateByExample(@Param("record") ItemEntity record, @Param("example") ItemEntityExample example);

    int updateByPrimaryKeySelective(ItemEntity record);

    int updateByPrimaryKey(ItemEntity record);

    List<ItemEntity> findAllItem();

    /**
     * 根据查询结果分页
     *
     * @param queryItemsDTO
     * @return
     */
    List<ItemEntity> findAllItemByCondition(QueryItemsDTO queryItemsDTO);
}